In known arithmetic units, it is possible to calculate a multiply accumulate function. In a multiply accumulate function, a first number X is multiplied by a second number Y and added to an accumulator ACCU. In mathematical notation, the result RES of this function can be represented as follows: RES=ACCU+X*Y.
Reference is made to FIG. 1 which shows a block diagram of an arithmetic unit 2 which is able to add together two partial products P1 and P2 and the accumulator. The arithmetic unit 2 has a first register 4 which stores the value P1 and a second register 6 which stores the value P2. When X is multiplied by Y, two partial products P1 and P2 result, with P1+P2=X*Y. These values P1 and P2 are stored in the first and second registers 4 and 6 respectively.
The current accumulator ACCU is stored in a third register 8. In order to obtain the result RES, two further steps are carried out. The three vectors P1, P2 and the accumulator ACCU are reduced to two vectors through a carry save adder stage 10. The carry save adder stage 10 actually comprises a number of individual 3 to 2 carry save adders each of which provides two outputs. One of those outputs is a sum output and the other output is a carry output. The number of carry save adders making up the carry save adder stage will at least be equal to the number of bits of the resister P1, the register P2 or the accumulator ACCU.
As discussed hereinbefore, each individual carry save adder provides two outputs, a carry output and a sum output. As there are several carry save adders in parallel, a sum vector and a carry vector are obtained. These vectors are input to a global adder 12. The global adder 12 provides the result RES.
When the first value P1, the second value P2 and the third value ACCU are added together, the result RES may fall outside a permitted range of values.